#ifndef WINDOWWIDGET_H
#define WINDOWWIDGET_H

#include <QWidget>
#include <QGLWidget>
#include <QtGui>
#include <QTimer>
#include <QFont>
#include <list>
#include <QString>

#include <vector>

#include "lights.h"
#include "mesh_loader.h"
#include "terrain_loader.h"
#include "camera.h"
#include "boat.h"
#include "splitter.h"

/*
 //Goals:
 menu:
    -create
    -speed
    -load
    -save
    -run
    -map
 camera:
    -coordinate translation
    -
 terrain:
    -load ireland
    -add water somehow
 mesh:
    -load a boat for sample

 */

namespace Ui {
    class windowWidget;
}

class windowWidget : public QGLWidget
{
    Q_OBJECT

public:
    explicit windowWidget(QWidget *parent = 0);
    ~windowWidget();

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void keyPressEvent(QKeyEvent *event);
    void initializeGL();
    void paintGL();
    void resizeGL(int width, int height);
    void setupViewport(int width, int height);
    void checkCollisions();
    void resetGame();
    void autoPlay();
    void loadScenario();//-load //function: file dialog
    void saveScenario();//-save //function: file dialog

private slots:
    void animate();
    

private:
    Ui::windowWidget *ui;
    //Model* worldModel;
    blackjack::Terrain *terrain;
    int worldLoaded;
    QTimer timer;
    std::vector<boat> fleet;

    //menu variables (mostly index)
    int playMode;//menu, play, or...//-run //-create
    int subMenu;//which menu are we in
    int menuSel;//what option are we on
    int initMenuX, initMenuY, menuX, menuY;
    int yInc;//spacing
    int speedChoice;//-speed

    lights sceneLights;//default lights, not enabled yet
    camera myCamera;
};

#endif // WINDOWWIDGET_H
